﻿using System;
using System.Collections.Generic;
using MongoDB.Bson;

namespace QuotationService.HistoryQuotation
{
    /// <summary>
    /// 基本信息历史数据类
    /// </summary>
    internal class ComboBasicInfo
    {
        public ObjectId _id;

        /// <summary>
        /// 商品ID
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 涨停价
        /// </summary>
        public double MaxOrderPrice { get; set; }

        /// <summary>
        /// 跌停价
        /// </summary>
        public double MinOrderPrice { get; set; }

        /// <summary>
        /// 开盘价
        /// </summary>
        public double OpenPrice { get; set; }

        /// <summary>
        /// 收盘价
        /// </summary>
        public double PreClosePrice { get; set; }

        /// <summary>
        /// 小数位数
        /// </summary>
        public int Decimal { get; set; }


        /// <summary>
        ///记录更新的时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 行情记录中包含的行情时间
        /// </summary>
        public DateTime QuotationTime { get; set; }

        /// <summary>
        /// 所属用户的唯一标识
        /// </summary>
        public string AuthCode { get; set; }

        /// <summary>
        /// 用户定义的组合代码
        /// </summary>
        public string UserDefinedCode { get; set; }

        /// <summary>
        /// 追踪指数代码
        /// </summary>
        public string TracingIndex { get; set; }

        /// <summary>
        /// 合约乘数
        /// </summary>
        public int ContractTimes { get; set; }

        /// <summary>
        /// 篮子类型
        /// </summary>
        public char BasketType { get; set; }

        /// <summary>
        /// 成分股数量
        /// </summary>
        public int ExchangeStockCount { get; set; }

        /// <summary>
        /// 成分股
        /// </summary>
        public List<ComboComponent> Components { get; set; }

    }
    /// <summary>
    /// 组合成分股
    /// </summary>
    public class ComboComponent
    {

        /// <summary>
        /// 成分股代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 成分股名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public Int32 ExecuteQty { get; set; }

    }

}
